package com.shuiyun.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class BoatExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public BoatExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andBoatIdIsNull() {
            addCriterion("boat_id is null");
            return (Criteria) this;
        }

        public Criteria andBoatIdIsNotNull() {
            addCriterion("boat_id is not null");
            return (Criteria) this;
        }

        public Criteria andBoatIdEqualTo(Integer value) {
            addCriterion("boat_id =", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdNotEqualTo(Integer value) {
            addCriterion("boat_id <>", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdGreaterThan(Integer value) {
            addCriterion("boat_id >", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("boat_id >=", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdLessThan(Integer value) {
            addCriterion("boat_id <", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdLessThanOrEqualTo(Integer value) {
            addCriterion("boat_id <=", value, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdIn(List<Integer> values) {
            addCriterion("boat_id in", values, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdNotIn(List<Integer> values) {
            addCriterion("boat_id not in", values, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdBetween(Integer value1, Integer value2) {
            addCriterion("boat_id between", value1, value2, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatIdNotBetween(Integer value1, Integer value2) {
            addCriterion("boat_id not between", value1, value2, "boatId");
            return (Criteria) this;
        }

        public Criteria andBoatNameIsNull() {
            addCriterion("boat_name is null");
            return (Criteria) this;
        }

        public Criteria andBoatNameIsNotNull() {
            addCriterion("boat_name is not null");
            return (Criteria) this;
        }

        public Criteria andBoatNameEqualTo(String value) {
            addCriterion("boat_name =", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameNotEqualTo(String value) {
            addCriterion("boat_name <>", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameGreaterThan(String value) {
            addCriterion("boat_name >", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameGreaterThanOrEqualTo(String value) {
            addCriterion("boat_name >=", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameLessThan(String value) {
            addCriterion("boat_name <", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameLessThanOrEqualTo(String value) {
            addCriterion("boat_name <=", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameLike(String value) {
            addCriterion("boat_name like", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameNotLike(String value) {
            addCriterion("boat_name not like", value, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameIn(List<String> values) {
            addCriterion("boat_name in", values, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameNotIn(List<String> values) {
            addCriterion("boat_name not in", values, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameBetween(String value1, String value2) {
            addCriterion("boat_name between", value1, value2, "boatName");
            return (Criteria) this;
        }

        public Criteria andBoatNameNotBetween(String value1, String value2) {
            addCriterion("boat_name not between", value1, value2, "boatName");
            return (Criteria) this;
        }

        public Criteria andIsfreeIsNull() {
            addCriterion("isfree is null");
            return (Criteria) this;
        }

        public Criteria andIsfreeIsNotNull() {
            addCriterion("isfree is not null");
            return (Criteria) this;
        }

        public Criteria andIsfreeEqualTo(Boolean value) {
            addCriterion("isfree =", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeNotEqualTo(Boolean value) {
            addCriterion("isfree <>", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeGreaterThan(Boolean value) {
            addCriterion("isfree >", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeGreaterThanOrEqualTo(Boolean value) {
            addCriterion("isfree >=", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeLessThan(Boolean value) {
            addCriterion("isfree <", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeLessThanOrEqualTo(Boolean value) {
            addCriterion("isfree <=", value, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeIn(List<Boolean> values) {
            addCriterion("isfree in", values, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeNotIn(List<Boolean> values) {
            addCriterion("isfree not in", values, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeBetween(Boolean value1, Boolean value2) {
            addCriterion("isfree between", value1, value2, "isfree");
            return (Criteria) this;
        }

        public Criteria andIsfreeNotBetween(Boolean value1, Boolean value2) {
            addCriterion("isfree not between", value1, value2, "isfree");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdIsNull() {
            addCriterion("start_place_port_id is null");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdIsNotNull() {
            addCriterion("start_place_port_id is not null");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdEqualTo(String value) {
            addCriterion("start_place_port_id =", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdNotEqualTo(String value) {
            addCriterion("start_place_port_id <>", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdGreaterThan(String value) {
            addCriterion("start_place_port_id >", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdGreaterThanOrEqualTo(String value) {
            addCriterion("start_place_port_id >=", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdLessThan(String value) {
            addCriterion("start_place_port_id <", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdLessThanOrEqualTo(String value) {
            addCriterion("start_place_port_id <=", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdLike(String value) {
            addCriterion("start_place_port_id like", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdNotLike(String value) {
            addCriterion("start_place_port_id not like", value, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdIn(List<String> values) {
            addCriterion("start_place_port_id in", values, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdNotIn(List<String> values) {
            addCriterion("start_place_port_id not in", values, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdBetween(String value1, String value2) {
            addCriterion("start_place_port_id between", value1, value2, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andStartPlacePortIdNotBetween(String value1, String value2) {
            addCriterion("start_place_port_id not between", value1, value2, "startPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdIsNull() {
            addCriterion("end_place_port_id is null");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdIsNotNull() {
            addCriterion("end_place_port_id is not null");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdEqualTo(String value) {
            addCriterion("end_place_port_id =", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdNotEqualTo(String value) {
            addCriterion("end_place_port_id <>", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdGreaterThan(String value) {
            addCriterion("end_place_port_id >", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdGreaterThanOrEqualTo(String value) {
            addCriterion("end_place_port_id >=", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdLessThan(String value) {
            addCriterion("end_place_port_id <", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdLessThanOrEqualTo(String value) {
            addCriterion("end_place_port_id <=", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdLike(String value) {
            addCriterion("end_place_port_id like", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdNotLike(String value) {
            addCriterion("end_place_port_id not like", value, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdIn(List<String> values) {
            addCriterion("end_place_port_id in", values, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdNotIn(List<String> values) {
            addCriterion("end_place_port_id not in", values, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdBetween(String value1, String value2) {
            addCriterion("end_place_port_id between", value1, value2, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andEndPlacePortIdNotBetween(String value1, String value2) {
            addCriterion("end_place_port_id not between", value1, value2, "endPlacePortId");
            return (Criteria) this;
        }

        public Criteria andBoatStateIsNull() {
            addCriterion("boat_state is null");
            return (Criteria) this;
        }

        public Criteria andBoatStateIsNotNull() {
            addCriterion("boat_state is not null");
            return (Criteria) this;
        }

        public Criteria andBoatStateEqualTo(Integer value) {
            addCriterion("boat_state =", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateNotEqualTo(Integer value) {
            addCriterion("boat_state <>", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateGreaterThan(Integer value) {
            addCriterion("boat_state >", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("boat_state >=", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateLessThan(Integer value) {
            addCriterion("boat_state <", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateLessThanOrEqualTo(Integer value) {
            addCriterion("boat_state <=", value, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateIn(List<Integer> values) {
            addCriterion("boat_state in", values, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateNotIn(List<Integer> values) {
            addCriterion("boat_state not in", values, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateBetween(Integer value1, Integer value2) {
            addCriterion("boat_state between", value1, value2, "boatState");
            return (Criteria) this;
        }

        public Criteria andBoatStateNotBetween(Integer value1, Integer value2) {
            addCriterion("boat_state not between", value1, value2, "boatState");
            return (Criteria) this;
        }

        public Criteria andReturnReasonIsNull() {
            addCriterion("return_reason is null");
            return (Criteria) this;
        }

        public Criteria andReturnReasonIsNotNull() {
            addCriterion("return_reason is not null");
            return (Criteria) this;
        }

        public Criteria andReturnReasonEqualTo(String value) {
            addCriterion("return_reason =", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonNotEqualTo(String value) {
            addCriterion("return_reason <>", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonGreaterThan(String value) {
            addCriterion("return_reason >", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonGreaterThanOrEqualTo(String value) {
            addCriterion("return_reason >=", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonLessThan(String value) {
            addCriterion("return_reason <", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonLessThanOrEqualTo(String value) {
            addCriterion("return_reason <=", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonLike(String value) {
            addCriterion("return_reason like", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonNotLike(String value) {
            addCriterion("return_reason not like", value, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonIn(List<String> values) {
            addCriterion("return_reason in", values, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonNotIn(List<String> values) {
            addCriterion("return_reason not in", values, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonBetween(String value1, String value2) {
            addCriterion("return_reason between", value1, value2, "returnReason");
            return (Criteria) this;
        }

        public Criteria andReturnReasonNotBetween(String value1, String value2) {
            addCriterion("return_reason not between", value1, value2, "returnReason");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUnloadDateIsNull() {
            addCriterion("unload_date is null");
            return (Criteria) this;
        }

        public Criteria andUnloadDateIsNotNull() {
            addCriterion("unload_date is not null");
            return (Criteria) this;
        }

        public Criteria andUnloadDateEqualTo(Date value) {
            addCriterionForJDBCDate("unload_date =", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("unload_date <>", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateGreaterThan(Date value) {
            addCriterionForJDBCDate("unload_date >", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("unload_date >=", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateLessThan(Date value) {
            addCriterionForJDBCDate("unload_date <", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("unload_date <=", value, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateIn(List<Date> values) {
            addCriterionForJDBCDate("unload_date in", values, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("unload_date not in", values, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("unload_date between", value1, value2, "unloadDate");
            return (Criteria) this;
        }

        public Criteria andUnloadDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("unload_date not between", value1, value2, "unloadDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}